package com.dlc.shop.bean.enums;

/**
 * @Author lth
 * @Date 2021/9/9 15:49
 */
public enum StockBillType {
    /**
     * 采购入库
     */
    PURCHASE_STORAGE(1, "采购入库","Purchasing Inbound", "yami.stock.bill.type.purchaseStorage"),
    /**
     * 退货入库
     */
    RETURN_STORAGE(2, "退款入库","Refunds to the Treasury", "yami.stock.bill.type.refundStorage"),
    /**
     * 其他入库
     */
    OTHER_STORAGE(3, "其他入库","Other inbound", "yami.stock.bill.type.otherStorage"),
    /**
     * 销售出库
     */
    PURCHASE_OUTBOUND(4, "销售出库","Sales out", "yami.stock.bill.type.purchaseOutbound"),
    /**
     * 编辑出库
     */
    EDIT_OUTBOUND(5, "编辑出库","Edit Out", "yami.stock.bill.type.editOutbound"),
    /**
     * 其他出库
     */
    OTHER_OUTBOUND(6, "其他出库","Other Outbound", "yami.stock.bill.type.otherOutbound"),
    /**
     * 库存初始化
     */
    INITIALIZE(7, "库存初始化","Inventory initialization", "yami.stock.bill.type.initialize"),

    /**
     * 订单取消
     */
    ORDER_CANCEL(8, "订单取消","Order Cancel", "yami.stock.bill.type.orderCancel"),

    /**
     * 编辑入库
     */
    EDIT_STORAGE(9, "编辑入库","Edit In", "yami.stock.bill.type.editStorage"),

    /**
     * 盘盈入库
     */
    PROFIT_STORAGE(10, "盘盈入库","Inventory", "yami.stock.bill.type.profitStorage"),

    /**
     * 盘亏出库
     */
    LOSS_OUTBOUND(11, "盘亏出库","Inventory out", "yami.stock.bill.type.lossOutbound"),

    /**
     * 调拨入库
     */
    ALLOT_IN(12, "调拨入库", "Allot In", "yami.stock.bill.type.allotIn"),

    /**
     * 调拨出库
     */
    ALLOT_OUT(13, "调拨出库", "Allot Out", "yami.stock.bill.type.allotOut"),

    /**
     * 库存模式切换出库
     */
    SWITCH_STATION(14, "库存模式切换出库", "Switch Station", "yami.stock.bill.type.switchStation"),

    /**
     * 库存模式切换入库
     */
    SWITCH_WAREHOUSE(15, "库存模式切换入库", "Switch Warehouse", "yami.stock.bill.type.switchWarehouse"),

    /**
     * 秒杀补充库存
     */
    SECKILL_STOCK(16, "秒杀补充库存", "seckill stock", "yami.stock.bill.type.seckillStock")
    ;

    private final Integer id;

    private final String remark;

    private final String remarkEn;

    private final String i18nTag;

    public Integer value() {
        return id;
    }

    public String text() {
        return remark;
    }

    public String textEn() {
        return remarkEn;
    }

    public String getI18nTag() {
        return i18nTag;
    }

    StockBillType(Integer id, String remark, String remarkEn, String i18nTag){
        this.id = id;
        this.remark = remark;
        this.remarkEn = remarkEn;
        this.i18nTag = i18nTag;
    }

    public static StockBillType instance(Integer value) {
        StockBillType[] enums = values();
        for (StockBillType statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
